1. Field of the Invention
The present invention relates to filtering for reducing noise in images.
2. Description of the Background Art
A mean filter and a median filter are used to reduce noise in images. The mean filter is used to calculate the average pixel value of a pixel of interest and its neighboring pixels to replace the value of the pixel of interest with this average pixel value. Namely, the intensity of the pixel of interest, or whether the pixel of interest is black or white is determined by the use of the mean filter. The mean filter serves to filter out high frequency components of an image, to thereby realize noise removal and prevention of blurring.
However, the mean filter suffers from blurring of high frequency components. In contrast, a non-linear filter typified by a median filter has received attention by reason of simple algorithm, excellence in edge conservation, no degradation of afterimage in principle that is unavoidable annoyance to cyclic noise reduction, and the like.
According to the technique introduced in Japanese Patent Application Laid-Open No. 4-235472 (1992), an image signal given from a solid state imaging device is subjected to the processing using the median filter to correct data error caused by flaws or defects in pixels. According to the filtering technique introduced in Japanese Patent Application Laid-Open No. 6-178165 (1994), the average pixel value of a pixel of interest and its neighboring pixels is calculated, and a pixel with a pixel value closest to the average pixel value is selected from the neighboring pixels including the pixel of interest to be applied for use as a corrective pixel.
However, the technique introduced in Japanese Patent Application Laid-Open No. 4-235472 fails to perform accurate correction in the event that data error continuously occurs in the neighborhood of a pixel of interest, for example. Namely, data correction cannot be realized when a median value itself largely deviates from the original pixel value of a pixel of interest. The technique introduced in Japanese Patent Application Laid-Open No. 6-178165 is intended to remove or reduce Gaussian noise. This technique fails to perform accurate correction, in the event that a distribution of pixel values in a region targeted for the calculation of an average value and a distribution of pixel values of neighboring pixels including a pixel of interest are significantly different from each other, for example.